package com.itheima.mapper;

import com.itheima.entity.dto.order.OrderStatusDto;
import com.itheima.entity.pojo.Order;
import com.itheima.entity.vo.order.OrderUserPageLVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author huangzelnag
 * @create 2022-05-12
 */
@Mapper
public interface OrderMapper {

   List <Order> selectPage(  @Param("beginTime") Date beginTime,
                             @Param("endTime") Date endTime,
                             @Param("number") String number,
                             @Param("page") Integer page,
                             @Param("pageSize") Integer pageSize);

    Integer selectCountPageCondition(@Param("beginTime") Date beginTime,
                                     @Param("endTime") Date endTime,
                                     @Param("number") String number);


    Boolean updateStatus(OrderStatusDto orderStatusDto);

    void insert(Order order);

    Integer selectUserIdCount(String userId);

    List<OrderUserPageLVo> selectUserIdPage(String userId, Integer page, Integer pageSize);
}
